package cn.edu.lsnu.mbti.controller;

import cn.edu.lsnu.mbti.common.R;
import cn.edu.lsnu.mbti.entity.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

@RestController
@Slf4j
@RequestMapping("api")
public class MBTIController {


    @GetMapping ("getHello")
    public R getHelloWord(){
        log.info("进入到api接口.......");
        return R.success("hello world api get 接口数据");
    }

    @PostMapping("postHello")
    public R postHelloWord(@RequestBody User user){
        log.info("进入post 方法.....");
        System.out.println(user.toString());
        return R.success("hello world api post接口数据");
    }

}
